#ifndef File_H
#define File_H

#include <defs/export.h>
#include <defs/global.h>
#include <core/entityobject.h>

#include <QtScript>
#include <QtCore>

namespace Opl{ namespace Scripting{ namespace System{ namespace IO{

                O_PRIVATE_DECLARE(File);
                class SCRIPTING_EXPORT File : public Opl::Core::EntityObject ,protected QScriptable {
                    Q_OBJECT
                public:
                    static QString ID;
                    File();
                    File(const QString& path);
                    virtual ~File();

                    QString name()const;
                    void setName(const QString& param);

                    Q_INVOKABLE QString readAllText();
                    static QScriptValue construct_Script(QScriptContext *context, QScriptEngine *engine);
                public slots:


                private:
                    O_PRIVATE_DECLARE_MEMBER(File);
                };



}}}}

Q_DECLARE_METATYPE(Opl::Scripting::System::IO::File*)

#endif // File_H

